/// 
/// 定义了常见请求状态，例如网络错误、超时、成功等
/// 

class Code {
  static const SUCCESS = 200;

  ///取消网络请求
  static const NETWORK_CANCEL = 206;

  ///网络错误
  static const NETWORK_ERROR = 404;

  ///未知错误
  static const ERROR = 500;

  ///网络超时
  static const NETWORK_TIMEOUT = 505;

  ///网络返回数据格式化一次
  static const NETWORK_JSON_EXCEPTION = -3;

  static errorHandleFunction(code, message, noTip) {
    if (noTip) {
      return message;
    }
    return message;
  }
}